<template>
  <div id="app">
    <router-view class="main" />
    <!-- v-model="active" active-color="#ee0a24" inactive-color="#000" -->
    <van-tabbar :fixed="false" v-show="isShowNav" route active-color="deeppink">
      <van-tabbar-item icon="home-o" :to="{ name: 'Faxian' }"
        >首页</van-tabbar-item
      >
      <van-tabbar-item icon="fire-o" :to="{ name: 'Boke' }"
        >播客</van-tabbar-item
      >
       <van-tabbar-item icon="tv-o" :to="{ name: 'Mvs' }"
        >MV</van-tabbar-item
      >
      <van-tabbar-item icon="music-o" :to="{ name: 'Mine' }"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShowNav: true,
      num: 0,
    };
  },
  watch: {
    //全局组件在这监听
    $route(v) {
      if (v.meta.hideNav) {
        this.isShowNav = false;
      } else {
        this.isShowNav = true;
      }
    },
  },
};
</script>

<style lang="scss">
html,
body,
#app {
  width: 100%;
  height: 100%;
}
#app {
  display: flex;
  flex-direction: column;
}
img {
  max-width: 100%;
}
.main {
  flex: 1;
  overflow: auto; // 多出部分隐藏并显示进度条
}
</style>
